package com.jyu.apts.dto;

import com.jyu.apts.entity.Item;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class ItemDto {
	long id;
	String name;
	String image;
	String price;
	OrganizationDto organization;
	public ItemDto convert(Item item) {
		setId(item.getId());
		setName(item.getName());
		setImage(item.getImage());
		setPrice(item.getPrice());
		setOrganization(new OrganizationDto().convert(item.getOrganization()));
		return this;
	}
}
